
#ifndef EDITORCOMMANDS_H
#define EDITORCOMMANDS_H

//#include "EditorProcs.h"

#include <list>
#include <memory>
#include <string>
#include <map>

class Command{
public:
	virtual ~Command(){};
	virtual void Execute() = 0;
	virtual void Undo() = 0;
};

extern std::list<std::shared_ptr<Command>> undo_history;
extern std::list<std::shared_ptr<Command>> redo_history;
extern std::map<std::string, Command*(*)(std::string)> commands;

template<class T>
Command* CreateCommand(std::string params)
{
	return new T(params);
}

void RunCommand(std::string line);
void UndoCommand();
void RedoCommand();

#endif /* EDITORCOMMANDS_H */
